package com.ymh.spring.service;

import org.springframework.beans.factory.annotation.Autowired;

//@Component(value = "CDPlayer")
public class CDPlayer implements MediaPlayer {

	private CompactDisc cd;

	public CDPlayer() {}

	@Autowired
	public CDPlayer(CompactDisc cd) {
		this.cd = cd;
	}

	@Autowired
	public void setCd(CompactDisc cd) {
		this.cd = cd;
	}

	@Override
	public void play() {
		cd.play();
	}

}
